<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>我的蔬果--我的购物车</title>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="jsp/reset.css">
    <link rel="stylesheet" href="jsp/carts.css">
    <link rel="stylesheet" type="text/css" href="jsp/ddym.css"/>
    <script src="jsp/gsjs.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="top">
    <div id="topz">
        <div id="top1">
            <img src="jsp/YNIK%7BT%60J8AT~PQ(8LL9QPJR.png">
        </div>
        <div id="top2">
            <a href="/jumpindex" id="top21">集市首页</a>
        </div>
        <div id="top3">
            <span>欢迎来到本集市，开启新鲜水果之旅！</span>
        </div>
        <div id="top4" style="width: 100px;margin-left: 300px">
            <#if userInfo??>
            <a href="login.html" id="top41">你好;${userInfo.username}</a>
            <input id="userid" value="${abc.userid}" type="text" style="display: none">
            <#else>
            <a href="login.html" id="top41">请登录</a>
            </#if>
        </div>
        <div id="top5">
            <a href="register.html" id="top51">免费注册</a>
        </div>
        <div id="top6">
            <a href="/jumpmygoods" id="top61">我的订单</a>
        </div>
        <div id="top7">
            <a href="" id="top71">商家支持</a>
        </div>
        <div id="top8">
            <a href="" id="top81" onmouseover="over()" onmouseout="out()">网站导航</a>
        </div>
        <div id="top9" onmouseover="over()" onmouseout="out()">
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
            <div id="wzdh1">
                <a href="蔬果集市帮助中心.html" id="wzdh11">帮助中心</a>
            </div>
        </div>
    </div>
</div>

<div id="banner">
    <div id="banner1">
        <div id="logo">
            <a href="index.html"><img src="jsp/731.jpg"></a>
        </div>
        <div id="tt" style="width: 140px;height: 40px;float: left;text-align: center;line-height: 40px">
            <a href="index.html" id="tit">蔬果集市</a>
        </div>
        <div id="sc">
        </div>
        <div id="search" style="width: 600px;height: 40px;float: left;padding-top: 3px">
            <div id="search1" style="width: 440px;height: 32px;background-color: #ff4400;padding-top: 4px;margin: auto">
                <form action="http://www.baidu.com/s" method="get">
                    <input type="text" name="wd" id="banner3" value="" size="60" placeholder="请输入您的订单"/>
                    <input type="submit" id="banner4" value="搜索"/>
                </form>
            </div>
        </div>
    </div>
</div>

<div id="banner5">
    <a href="">
        <div id="banner6">
				<span id="qbsp">
					全部商品
					<span id="shu1">

					</span>
				</span>
        </div>
    </a>

    <a href="" onmouseover="bk()" onmouseout="hk()">
        <div id="banner7">
				<span id="jjsp">
					降价商品
					<span id="shu2">
						0
					</span>
				</span>
        </div>
    </a>

    <a href="" onmouseover="bk()" onmouseout="hk()">
        <div id="banner8">
				<span id="kcjz">
					库存紧张
					<span id="shu3">
						0
					</span>
				</span>
        </div>
    </a>

    <div id="banner9">
				<span id="yxsp">
					已选商品(不含运费)
					<span id="shu4">
						0.00
					</span>
				</span>
        <a href="">
            <div id="js">结算</div>
        </a>
    </div>
</div>

<section class="cartMain" id="zsp">
    <div class="cartMain_hd">
        <ul class="order_lists cartTop">
            <li class="list_chk">
                <!--所有商品全选-->
                <input type="checkbox" id="all" class="whole_check">
                <label for="all"></label>
                全选
            </li>
            <li class="list_con">商品信息</li>
            <li class="list_info">商品参数</li>
            <li class="list_price">单价</li>
            <li class="list_amount">数量</li>
            <li class="list_sum">金额</li>
            <li class="list_op">操作</li>
        </ul>
    </div>


    <div class="cartBox" style="margin-bottom: 0px;">
        <div class="shop_info">
            <div class="all_check">
                <!--店铺全选-->
                <input type="checkbox" id="shop_c" class="shopChoice">
                <label for="shop_c" class="shop"></label>
            </div>
            <div class="shop_name">
                店铺：<a href="javascript:;">南野田园旗舰店</a>
            </div>
        </div>

        <#list usergoods as usergoods >
        <div class="order_content">
            <ul class="order_lists">
                <li class="list_chk">
                    <input type="checkbox" id="checkbox_${usergoods.goodsid}" class="son_check" onclick="if(this.checked){selectgoods(this)}" name="${usergoods.goodsid},${usergoods.goodspic},${usergoods.goodsname},${usergoods.goodsprice},${usergoods.goodscount}">
                    <label for="checkbox_${usergoods.goodsid}"></label>
                </li>
                <li class="list_con">
                    <div class="list_img"><a href="javascript:;"><img src="${usergoods.goodspic}" alt=""></a></div>
                    <input id="goodspic" value="${usergoods.goodspic}" type="text" style="display: none">
                    <div class="list_text"><a href="javascript:;">${usergoods.goodsname}</a></div>
                    <input id="goodsname" value="${usergoods.goodsname}" type="text" style="display: none">
                </li>
                <li class="list_info">
                    <p>规格：默认</p>
                    <p>尺寸：16*16*3(cm)</p>
                </li>
                <li class="list_price">
                    <p class="price">￥${usergoods.goodsprice}</p>
                    <input id="goodsprice" value="${usergoods.goodsprice}" type="text" style="display: none">
                </li>
                <li class="list_amount">
                    <div class="amount_box"><!--购买提交的数量-->
                        <a href="javascript:;" class="reduce reSty">-</a>
                        <input type="text" value="${usergoods.goodscount}" class="sum" id="sum">
                        <a href="javascript:;" class="plus">+</a>
                    </div>
                </li>
                <li class="list_sum">

                    <p class="sum_price">￥${usergoods.goodsprice * usergoods.goodscount}</p>
                </li>
                <li class="list_op">
                    <p class="del"><a href="javascript:;" class="delBtn" name="${usergoods.goodsid}"
                                      onclick="deleteGoods(this)">移除商品</a></p>
                </li>
            </ul>
        </div>
    </#list>
    </div>
    <hr id="hr">
    <!--底部-->
    <div class="bar-wrapper" id="bar11">
        <div class="bar-right">
            <div class="piece" >已选商品<strong class="piece_num" id="buycount">0</strong>件</div>
            <div class="totalMoney" >共计: <strong class="total_text" id="totalprice">0.00</strong></div>
            <div class="calBtn"><a onclick="paymoney()">结算</a></div>
        </div>
    </div>
</section>
<section class="model_bg"></section>
<section class="my_model">
    <p class="title">删除宝贝<span class="closeModel">X</span></p>
    <p>您确认要删除该宝贝吗？</p>
    <div class="opBtn"><a href="javascript:;" class="dialog-sure">确定</a><a href="javascript:;"
                                                                           class="dialog-close">关闭</a></div>
</section>


<div id="di">

    <div id="bottom">
        <div id="bottom1">

        </div>
        <div id="bottom2">
            <div id="bottom21">
                <br>
                <br>
                <span><a href="" class="bm1 gg"><b style="font-size: 14px;">购物指南</b></a></span><br>
                <br>
                <br>
                <span><a href="" class="bm11 gg1">购物流程</a></span><br>
                <br>
                <span><a href="" class="bm12 gg1">会员介绍</a></span><br>
                <br>
                <span><a href="" class="bm13 gg1">生活旅行</a></span><br>
                <br>
                <span><a href="" class="bm14 gg1">常见问题</a></span><br>
                <br>
                <span><a href="" class="bm15 gg1">联系客服</a></span><br>
            </div>
            <div id="bottom22">
                <br>
                <br>
                <span><a href="" class="bm2 gg"><b style="font-size: 14px;">配送方式</b></a></span><br>
                <br>
                <br>
                <span><a href="" class="bm21 gg1">上门自提</a></span><br>
                <br>
                <span><a href="" class="bm22 gg1">211限时达</a></span><br>
                <br>
                <span><a href="" class="bm23 gg1">配送服务查询</a></span><br>
                <br>
                <span><a href="" class="bm24 gg1">配送费收取标准</a></span><br>
                <br>
                <span><a href="" class="bm25 gg1">海外配送</a></span><br>
            </div>
            <div id="bottom23">
                <br>
                <br>
                <span><a href="" class="bm3 gg"><b style="font-size: 14px;">支付方式</b></a></span><br>
                <br>
                <br>
                <span><a href="" class="bm31 gg1">货到付款</a></span><br>
                <br>
                <span><a href="" class="bm32 gg1">在线支付</a></span><br>
                <br>
                <span><a href="" class="bm33 gg1">分期付款</a></span><br>
                <br>
                <span><a href="" class="bm34 gg1">公司转账</a></span><br>
            </div>
            <div id="bottom24">
                <br>
                <br>
                <span><a href="" class="bm4 gg"><b style="font-size: 14px;">售后服务</b></a></span><br>
                <br>
                <br>
                <span><a href="" class="bm41 gg1">售后政策 </a></span><br>
                <br>
                <span><a href="" class="bm42 gg1">价格保护 </a></span><br>
                <br>
                <span><a href="" class="bm43 gg1">退款说明 </a></span><br>
                <br>
                <span><a href="" class="bm44 gg1">返修/退换货 </a></span><br>
                <br>
                <span><a href="" class="bm45 gg1">取消订单</a></span><br>
            </div>
            <div id="bottom25">
                <br>
                <br>
                <span><a href="" class="bm5 gg"><b style="font-size: 14px;">特色服务</b></a></span><br>
                <br>
                <br>
                <span><a href="" class="bm51 gg1">夺宝岛 </a></span><br>
                <br>
                <span><a href="" class="bm52 gg1">DIY装机 </a></span><br>
                <br>
                <span><a href="" class="bm53 gg1">延保服务 </a></span><br>
                <br>
                <span><a href="" class="bm54 gg1"></a></span><br>
                <span><a href="" class="bm55 gg1"></a></span><br>
            </div>
        </div>
        <div id="bottom3">

        </div>
    </div>
</div>

</body>
<script src="jsp/jquery.min.js"></script>
<script src="jsp/carts.js"></script>
<script type="text/javascript">
    function bk() {
        document.getElementById("banner6").style.borderBottom = '0px solid red';
    }

    function hk() {
        document.getElementById("banner6").style.borderBottom = '3px solid red';
    }

    function js() {
        var x = document.body.scrollTop;
        if (x > 1200) {
            document.getElementById("bar11").style.position = 'static';
        } else {
            document.getElementById("bar11").style.position = 'fixed';
        }
    }

    $(window).bind("scroll", js);

    function paymoney() {
        var count = document.getElementById("buycount").innerHTML;
        var y = document.getElementById("totalprice").innerHTML;
        var length = y.length;
        var price = y.substring(1,length+1);
        $.ajax({
            url: ("/pay"),
            type: "post",
            data: {
                goodsprice: price,
                goodscount: count,
            },
            dataType: "text",
            success: function (data) {
                if (data == "paymoney") {
                    location.assign("/paypage")
                }
            }
        })
    }

    function deleteGoods(n) {
        var goodsid = n.name;
        $.ajax({
            url: ("/deleteGoods"),
            type: "post",
            data: {
                userid: $("#userid").val(),
                goodsid: goodsid
            },
            dataType: "text",
            success: function (data) {
                if (data == "删除商品") {
                    location.assign("/jumpmygoods")
                }
            }
        })
    }
    var sbgoods;
    function selectgoods(n) {
        var x = n.name;
        var y = x.split(",");
        sbgoods = {sugoodsid:y[0],}
    }
</script>
</html>
